home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib25 / fgetc.c < prev    next >
C/C++ Source or Header  |  1992-09-17  |  206b  |  13 lines

  1. #include <stdio.h>
  2.  
  3. int fgetc(fp)
  4. FILE *fp;
  5. {
  6.     int c;
  7.  
  8.     do {
  9.     c = --fp->_cnt >= 0 ? ((int)*fp->_ptr++) : _filbuf(fp);
  10.     } while ((!(fp->_flag & _IOBIN)) && (c == '\r'));
  11.     return c;
  12. }
  13.